package com.parking.mgr.useraccount.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.parking.mgr.common.annotion.BusinessLog;
import com.parking.mgr.common.annotion.LoginAuth;
import com.parking.mgr.common.annotion.PermissionUrl;
import com.parking.mgr.common.enums.LogAnnotionOpTypeEnum;
import com.parking.mgr.common.pojo.base.param.BaseParam;
import com.parking.mgr.common.pojo.page.PageResult;
import com.parking.mgr.common.pojo.response.Result;
import com.parking.mgr.useraccount.model.param.BasicRoleParam;
import com.parking.mgr.useraccount.model.vo.BasicRoleVO;
import com.parking.mgr.useraccount.service.BasicMenuService;
import com.parking.mgr.useraccount.service.BasicRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Collection;
import java.util.List;

/**
 * @author shilintao
 * @ClassName BasicRoleController
 * @Description 角色
 * @Date 2023/5/23
 */
@Api(value = "角色", tags = {"角色"})
@RequestMapping("/api/basic/role")
@RestController
public class BasicRoleController {

    @Resource
    private BasicRoleService basicRoleService;

    @GetMapping("/detail")
    @ApiOperation(value = "用户角色", notes = "用户角色", httpMethod = "GET")
    @PermissionUrl
    public Result<?> getOne(HttpServletRequest request) {

        return Result.success(basicRoleService.getOneByRequest(request));
    }

}
